<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Commerce Office</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- CSS -->
    <link href="<?php echo base_url();?>assets/css/bootstrap.css" rel="stylesheet">
    <style type="text/css">

      /* Sticky footer styles
      -------------------------------------------------- */
      html,
      body {
        height: 100%;
        /* The html and body elements cannot have any padding or margin. */
      }

      /* Wrapper for page content to push down footer */
      #wrap {
        min-height: 100%;
        height: auto !important;
        height: 100%;
        /* Negative indent footer by it's height */
        margin: 0 auto -60px;
      }

      /* Set the fixed height of the footer here */
      #push,
      #footer {
        height: 60px;
      }
      #footer {
        background-color: #f5f5f5;
      }

      /* Lastly, apply responsive CSS fixes as necessary */
      @media (max-width: 767px) {
        #footer {
          margin-left: -20px;
          margin-right: -20px;
          padding-left: 20px;
          padding-right: 20px;
        }
      }

      /* Custom page CSS
      -------------------------------------------------- */
      /* Not required for template or sticky footer method. */

      #wrap > .container {
        padding-top: 60px;
      }
      .container .credit {
        margin: 20px 0;
      }
      code {
        font-size: 80%;
      }
      
      .form-signin {
        max-width: 400px;
        padding: 19px 29px 29px;
        margin: 50px auto;
        background-color: #fff;
        border: 1px solid #e5e5e5;
        -webkit-border-radius: 5px;
           -moz-border-radius: 5px;
                border-radius: 5px;
        -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
           -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
                box-shadow: 0 1px 2px rgba(0,0,0,.05);
      }
      .form-signin .form-signin-heading,
      .form-signin .checkbox {
        margin-bottom: 10px;
      }
      .form-signin input[type="text"],
      .form-signin input[type="password"] {
        font-size: 16px;
        height: auto;
        margin-bottom: 15px;
        padding: 7px 9px;
      }

    </style>
    <link href="<?php echo base_url();?>assets/css/bootstrap-responsive.css" rel="stylesheet">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="<?php echo base_url();?>assets/js/html5shiv.js"></script>
    <![endif]-->

    <!-- Fav and touch icons -->
    <link rel="shortcut icon" href="<?php echo base_url();?>assets/image/icon.png">
    
  </head>

  <body>


    <!-- Part 1: Wrap all page content here -->
    <div id="wrap">

      <!-- Fixed navbar -->
      <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="navbar-inner">
          <div class="container">
            <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <a class="brand" href="#">Commerce Office</a>
            <div class="nav-collapse collapse">
              <!--<ul class="nav navbar-form pull-right">
                <li><a href="#">Home</a></li>
                <li><a href="<?php echo site_url('auth/register');?>">Register</a></li>             
              </ul>-->
            </div><!--/.nav-collapse -->
          </div>
        </div>
      </div>

      <!-- Begin page content -->
		<div class="container">
			<div class="form-signin">
				
			<h2 class="form-signin-heading">Forgot your password ? </h2>
			
			<?php
			$login = array(
				'name'	=> 'login',
				'id'	=> 'login',
				'value' => set_value('login'),
				'maxlength'	=> 80,
				'size'	=> 30,
				'class' => 'input-block-level',
				'placeholder' => 'Username or Email address'
			);
			if ($this->config->item('use_username', 'tank_auth')) {
				$login_label = 'Email or login';
			} else {
				$login_label = 'Email';
			}
			?>
			<?php echo form_open($this->uri->uri_string(), 'id="forgot-form"'); ?>
			
			<span style="color: #E91510; margin:5px 0; display:block;">
				<?php echo form_error($login['name']); ?>
				<?php echo isset($errors[$login['name']])?$errors[$login['name']]:''; ?>
			</span>
			
			<p>
				<?php echo form_input($login); ?>
			</p>
			
			<?php echo form_submit('reset', 'Get a new password','class="btn btn-primary" type="submit"'); ?>
			
			<span style="float:right"> 
				<i class="icon-arrow-left"></i> <?php echo anchor('/auth/login/', 'Back to Login'); ?>
			</span>
			
			<?php echo form_close(); ?>
			</div>
		</div>

		<div id="push"></div>
	</div>

    <div id="footer">
      <div class="container">
        <p class="muted credit">Copyright &copy; 2013 <a href="#">Commerce</a></p>
      </div>
    </div>
    

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="<?php echo base_url();?>assets/js/jquery.1.9.1.js"></script>
    <script src="<?php echo base_url();?>assets/js/bootstrap-transition.js"></script>
    <script src="<?php echo base_url();?>assets/js/bootstrap-alert.js"></script>
    <script src="<?php echo base_url();?>assets/js/bootstrap-modal.js"></script>
    <script src="<?php echo base_url();?>assets/js/bootstrap-dropdown.js"></script>
    <script src="<?php echo base_url();?>assets/js/bootstrap-scrollspy.js"></script>
    <script src="<?php echo base_url();?>assets/js/bootstrap-tab.js"></script>
    <script src="<?php echo base_url();?>assets/js/bootstrap-tooltip.js"></script>
    <script src="<?php echo base_url();?>assets/js/bootstrap-popover.js"></script>
    <script src="<?php echo base_url();?>assets/js/bootstrap-button.js"></script>
    <script src="<?php echo base_url();?>assets/js/bootstrap-collapse.js"></script>
    <script src="<?php echo base_url();?>assets/js/bootstrap-typeahead.js"></script>
	<script src="<?php echo base_url();?>assets/js/jquery.validate.js"></script>
    
    <script type="text/javascript">
		$("#forgot-form").validate({
                rules: {
                    login: "required",
                },
                messages: {
                    name: "Username or Email is required!",
                },
                submitHandler: function(form) {					
                    form.submit();
                }
            });
            
            <?php if (isset($errors[$login['name']])){ ?>
				$("#login").removeClass('valid');
				$("#login").addClass('error');
			<?php }?>
	</script>
	
  </body>
</html>
